package net.sxjr.mbg.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 单据流水号
 * </p>
 *
 * @author cuixc
 * @since 2020-12-10
 */
@TableName("IG_BILL_SERIAL")
public class IgBillSerial extends Model<IgBillSerial> {

    private static final long serialVersionUID=1L;

    /**
     * 主键ID
     */
    @TableId("BILL_CODE")
    private String billCode;

    /**
     * 单据名称
     */
    @TableField("BILL_NAME")
    private String billName;

    /**
     * 流水号前缀
     */
    @TableField("PREFIX")
    private String prefix;

    /**
     * 流水号后缀
     */
    @TableField("SUFFIX")
    private String suffix;

    /**
     * 是否补齐
     */
    @TableField("FILL")
    private Integer fill;

    /**
     * 流水号规则
     */
    @TableField("SERIAL_RULE")
    private String serialRule;

    /**
     * 顺序号位数
     */
    @TableField("SERIAL_LENGTH")
    private Integer serialLength;

    /**
     * 最后顺序号
     */
    @TableField("SERIAL_LAST")
    private Long serialLast;

    /**
     * 最大流水号
     */
    @TableField("SERIAL_MAX")
    private Long serialMax;

    /**
     * 最后生成时间
     */
    @TableField("LAST_TIME")
    private LocalDateTime lastTime;


    public String getBillCode() {
        return billCode;
    }

    public IgBillSerial setBillCode(String billCode) {
        this.billCode = billCode;
        return this;
    }

    public String getBillName() {
        return billName;
    }

    public IgBillSerial setBillName(String billName) {
        this.billName = billName;
        return this;
    }

    public String getPrefix() {
        return prefix;
    }

    public IgBillSerial setPrefix(String prefix) {
        this.prefix = prefix;
        return this;
    }

    public String getSuffix() {
        return suffix;
    }

    public IgBillSerial setSuffix(String suffix) {
        this.suffix = suffix;
        return this;
    }

    public Integer getFill() {
        return fill;
    }

    public IgBillSerial setFill(Integer fill) {
        this.fill = fill;
        return this;
    }

    public String getSerialRule() {
        return serialRule;
    }

    public IgBillSerial setSerialRule(String serialRule) {
        this.serialRule = serialRule;
        return this;
    }

    public Integer getSerialLength() {
        return serialLength;
    }

    public IgBillSerial setSerialLength(Integer serialLength) {
        this.serialLength = serialLength;
        return this;
    }

    public Long getSerialLast() {
        return serialLast;
    }

    public IgBillSerial setSerialLast(Long serialLast) {
        this.serialLast = serialLast;
        return this;
    }

    public Long getSerialMax() {
        return serialMax;
    }

    public IgBillSerial setSerialMax(Long serialMax) {
        this.serialMax = serialMax;
        return this;
    }

    public LocalDateTime getLastTime() {
        return lastTime;
    }

    public IgBillSerial setLastTime(LocalDateTime lastTime) {
        this.lastTime = lastTime;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.billCode;
    }

    @Override
    public String toString() {
        return "IgBillSerial{" +
        "billCode=" + billCode +
        ", billName=" + billName +
        ", prefix=" + prefix +
        ", suffix=" + suffix +
        ", fill=" + fill +
        ", serialRule=" + serialRule +
        ", serialLength=" + serialLength +
        ", serialLast=" + serialLast +
        ", serialMax=" + serialMax +
        ", lastTime=" + lastTime +
        "}";
    }
}
